<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <h2 class="blue red bold">classList</h2>
    <script>
      //获得标签名为h2的元素的样式列表对象
      var h2ClassList = document.querySelector('h2').classList
      //删除类样式
      h2ClassList.remove('red', 'bold')
    </script>
  </body>
</html>
